<?php defined( 'BASEPATH' ) or die( 'Restricted' );

class generateForm extends tgsfForm
{
	protected function _setup()
	{
		$this->method = 'get';
		$this->id( 'generate_form' );
		$this->useTemplate( 'top' );

		$this->_( fftText )->caption( 'Controller' )->name( 'controller' );
		$this->_( fftText )->caption( 'Model' )->name( 'model' );
		$this->_( fftText )->caption( 'View' )->name( 'view' );
		$this->_( fftText )->caption( 'Form' )->name( 'form' );
		$this->_( fftCheck )->caption( 'Require Login' )->name( 'require_login' );
		$this->_( fftText )->caption( 'Minimum Role' )->name( 'min_role' );
		$this->_( fftText )->caption( 'Model Action' )->name( 'model_action' );
		$this->_( fftText )->caption( 'Error Message' )->name( 'error_message' );
		$this->_( fftText )->caption( 'Success Url' )->name( 'success_url' );
		$this->_( fftText )->caption( 'Cancel Url' )->name( 'cancel_url' );
		$this->_( fftText )->caption( 'Success MSG' )->name( 'success_msg' );
		$this->_( fftText )->caption( 'Window Title' )->name( 'window_title' );
		$this->_( fftText )->caption( 'Developer' )->name( 'developer' );
		
		$this->_( fftTextArea )->caption( 'Extra JS example: js_path() . \'path/to/file.js\'' )->name( 'extra_js' );
		$this->_( fftTextArea )->caption( 'Extra CSS example: css_path() . \'path/to/file.css\'' )->name( 'extra_css' );

		//------------------------------------------------------------------------
		// BUTTONS
		//------------------------------------------------------------------------

		$this->startGroup( '_buttons' );
		$this->_( fftSubmit )->caption( 'Save' )->name( 'go' )->setFieldAttribute( 'class', 'ui-priority-primary' );

	}

	//------------------------------------------------------------------------

	protected function _setupValidate( &$v )
	{
//		$v->_( 'account_type_name' )->required()->max_len( 50 );
	}

	//------------------------------------------------------------------------
}

return new generateForm();